package moxl.parser.assemblers.pi;

import moxl.parser.ParserException;
import moxl.parser.markup.types.ProcessingInstructionMarkup;
import moxl.tokenizer.TokenizerException;

public class ProcessingInstructionExpectingBodyState extends ProcessingInstructionStateDelegateBase
{
	@Override
	protected void acceptProcessingInstructionBody(ProcessingInstructionAssemblerContext ctx) throws ParserException, TokenizerException
	{
		ctx.setMarkup(new ProcessingInstructionMarkup(ctx.getBookmarkedToken(ProcessingInstructionBookmark.TARGET).toString(), ctx.getToken().getImage()));
		ctx.changeState(ProcessingInstructionAssemblerState.ProcessingInstructionEndState);
	}
}
